Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add finish port #70

Merged
merged 6 commits into from
Jun 7, 2024
Merged

Add finish port #70

merged 6 commits into from
Jun 7, 2024

Conversation

wangzd12138
Copy link
Contributor

No description provided.

@@ -173,6 +173,8 @@ class CohPolicyBase {
return std::make_pair(false, cmd_for_null());
}

// finish
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没有必要啊,你现在基本就是都要呗,暂时代价也不是很大,没必要在征询policy了。

@@ -43,6 +43,9 @@ class OuterCohPortBase

bool is_uncached() const { return coh_id == -1; }
virtual void query_loc_req(uint64_t addr, std::list<LocInfo> *locs) = 0;

virtual void finish_req(uint64_t addr) = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没有比必要纯虚函数啊,对于不需要支持的,直接就不实现,根类上给一个空实现就好了。

@@ -280,6 +290,11 @@ class InnerCohPortT : public IPUC
}
return std::make_pair(hit, writeback);
}
virtual void finish_resp(uint64_t addr){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没必要征询policy

}

virtual void flush(uint64_t addr, uint64_t *delay) { addr = normalize(addr); flush_line(addr, policy->cmd_for_flush(), delay); }
virtual void flush(uint64_t addr, uint64_t *delay) { addr = normalize(addr); flush_line(addr, policy->cmd_for_flush(), delay); outer->finish_req(addr);}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flush和writeback为什么要finish?对于flush来说,LLC的flush_line()在结束的时候,所有内部缓存的处理已经完成了啊?

flush_line(meta->addr(iset), policy->cmd_for_flush(), delay);
outer->finish_req(meta->addr(iset));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flush没有必要送finish啊?

@@ -100,6 +105,9 @@ class OuterCohPortUncached : public OuterCohPortBase
virtual void query_loc_req(uint64_t addr, std::list<LocInfo> *locs){
coh->query_loc_resp(addr, locs);
}
virtual void finish_req(uint64_t addr){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

位置不对,finish只有在cached的port里面才有!
当然,这会给你造成麻烦,当LLC收到从一个uncached缓存来的acquire,grant之后不会收到finish。但是在这个时候,这个acquire 的coh_id应该是-1?所以LLC如果发现grant的请求的coh_id是-1,可以直接触发自己inner_cache的finish_resp(),而不用等inner cache发出finish

@wsong83
Copy link
Member

wsong83 commented Jun 5, 2024

finish只有在cached的port里面才有!
当然,这会给你造成麻烦,当LLC收到从一个uncached缓存来的acquire,grant之后不会收到finish。但是在这个时候,这个acquire 的coh_id应该是-1?所以LLC如果发现grant的请求的coh_id是-1,可以直接触发自己inner_cache的finish_resp(),而不用等inner cache发出finish

在你看完所有的review,确认OK之后,我再merge

@wsong83 wsong83 requested a review from HanJinChi June 5, 2024 03:53
@wsong83 wsong83 added this pull request to the merge queue Jun 7, 2024
Merged via the queue into master with commit 8123c92 Jun 7, 2024
1 check passed
@wsong83 wsong83 deleted the finish branch June 7, 2024 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants